#!/usr/bin/perl -w
#
use warnings;
use strict;
 
# Get two DNA sequences from user
print "Please give the first DNA sequence ";
our $seq1 = <STDIN>;chomp($seq1);
my @s1 = split(//,$seq1);
print "Please give the second DNA sequence ";
my $seq2 = <STDIN>;chomp($seq2);
my @s2 = split(//,$seq2);

# Start the score at 0
my $score = 0; 
#Loop through the sequences
my $index =0;
while ($index<= $#s1){
	# if one nucleotide is different, increases score with 1
	if($s1[$index] ne $s2[$index]){
		$score++;
	}
	# else with 3
	else{
		$score = $score +3;
	}
	 $index++;
}

            
# Write out the score result
print("$seq1 - $seq2 :$score"); 


 

